
import '@/assets/global.css'

import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App);

// 引入pinia
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persistedstate'
const pinia = createPinia()
// pinia数据持久化
pinia.use(piniaPluginPersist);
app.use(pinia);

// 引入路由
import router from './router'
app.use(router);

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { ElLoading } from 'element-plus'
// app.directive('loading',ElLoading.directive)
app.use(ElementPlus);

// 引入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app');
